#ifndef NM_HEADER
#define NM_HEADER

#include "includes.h"


#if(USE_AUTOSARNM_MODULE == STD_ON)



typedef enum
{
    NM_UNKNOWN=0U,
    NM_PASSIVE=1U,
    NM_REQUEST=8U,    
}NM_WakeTypeE;

typedef enum
{
    REPEAT_FROM_SLEEP=1U,
    REPEAT_FROM_PRESLEEP=2U,
    REPEAT_FROM_NORMAL=3U, 
    REPEAT_FROM_SUBSLEEP=4U,
    NORMAL_FROM_REPEAT=5U,  
    NORMAL_FROM_SUBSLEEP=6U,  
}NM_StateTypeE;

typedef enum
{
    NM_SLEEP=0,
    NM_PRE_SLEEP,
    NM_NETWORK,    
}NM_ModeTypeE;

typedef enum
{ 
    NM_SUB_INVALID=0U,
    NM_SUB_REPEAT,
    NM_SUB_SLEEP, 
    NM_SUB_NORMAL,   
}NM_SubStateTypeE;

extern NM_ModeTypeE NM_Mode;


#define NM_NORMAL   (NM_Mode==NM_NETWORK)

#define NM_SLEEP_TIMEOUT   50U
#define NM_REPEAT_TIMEOUT  100U
#define NM_TIMEOUT         250U
#define NM_WAIT_SLEEP_TIMEOUT 150U

#define NM_DIAG_ID      0x706U
#define NM_BRAODCAST_ID 0x7DFU

#define NM_TX_ID        0x696U
#define NM_START_ID     0x680U
#define NM_END_ID       0x6FFU

extern void NM_Init(void);
extern void NM_Mgr(void);
extern void NM_RecvMsg(uint16_t id,uint8_t *pData);
extern void NM_SendNMPdu(void);
#endif



#endif
